/**
 * 
 */
package com.hahaduo.bee.web.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author noodles.wumu@gmail.com
 * @since 2013/07/01 16:49:32
 * @version 0.1
 */

@Controller
public class LoginController {

	@RequestMapping(value = "/login", method = RequestMethod.GET)
	public String login() {

		return "login";

	}

	@RequestMapping(value = "/login", method = RequestMethod.POST)
	public void doLogin(HttpServletRequest req, HttpServletResponse res) {

		// res.setContentType("text/csv;charset=MS932");
		// String fileName;
		// EntityManager em = EMF.get().createEntityManager();
		// try {
		// fileName = new String("サンプル.csv".getBytes("MS932"), "ISO-8859-1");
		// res.setHeader("Content-Disposition",
		// "attachment; filename="+fileName);
		// File f= em.find(File.class, 11L);
		//
		// res.getOutputStream().write(f.getContents());
		// } catch (Exception e) {
		// // TODO Auto-generated catch block
		// e.printStackTrace();
		// } finally {
		// em.close();
		// }

	}

}
